package com.platform.common.core.oss;

/**
 * @author guoyunfei on 2021/11/7 10:41
 * @className VideoFirstFrame
 * @description TODO  视频首帧参数
 * @Version 1.0
 */
public class VideoFirstFrame {

    public static final String qiniuFirstFrame = "?vframe/jpg/offset/1";
    public static final String aliyunFirstFrame = "?x-oss-process=video/snapshot,t_1000,m_fast";
    public static final String tengxunFirstFrame = "?ci-process=snapshot&time=1&format=jpg";


    public static final String aliyunFirstFrameNoAd = "?x-oss-process=video/snapshot,t_1000,f_jpg,w_300,h_300,m_fast";

    /**
     * 视频首帧参数
     * @param type
     * @return
     */
    public static String getFirstFrame(String type){
        if("0".equals(type)){
            return qiniuFirstFrame;
        }else  if("1".equals(type)){
            return aliyunFirstFrame;
        }else  if("2".equals(type)){
            return tengxunFirstFrame;
        }
       return null;
    }

    /**
     * 视频首帧参数
     * @param type
     * @return
     */
    public static String getFirstFrameNoAd(String type){
        if("0".equals(type)){
            return null;
        }else  if("1".equals(type)){
            return aliyunFirstFrameNoAd;
        }else  if("2".equals(type)){
            return null;
        }
        return null;
    }

}
